
* PUT TOGHETHER TABLE BLOCKS


// get summary from residents
cd "$mypathRR/Results/Resident/summary_stats"

estread est_taxinc_thre2_resi 
estread est_ctrl_ir_60_80_resi 
estread est_rest_resi

// get summary from inmovers 
cd "$mypathRR/Results/Inmover/summary_stats"

estread est_taxinc_thre2_inmov
estread est_ctrl_ir_60_80_inmov
estread est_rest_inmov


// save LaTeX snippets to folder summarytable
cd "$mypathRR/Results/Table3-summarytable"

esttab einmov1 einmov2 einmov3  eresi1 eresi2 eresi3 using summ_taxburden.tex, replace fragment nofloat		///
cells("mean(fmt(a3))" "sd (par)") label nodepvar   									///
nonumbers nomtitles collabels(, none) noobs nolines 								///
varlabels(	avg_ntr1 	"Avg. NTR $(t<2006)$" 		avg_ntr2 "Avg. NTR $(t\geq 2006^*)$" ///
			avgt_wtax1 "Avg. wealth tax $(t<2006)$" avgt_wtax2 "Avg. wealth tax $(t\geq 2006^*)$" )
			

esttab einmov4 einmov5 einmov6  eresi4 eresi5 eresi6 using summ_hhchar.tex, replace fragment nofloat	///
cells("mean(fmt(a3))" "sd (par)") label nodepvar   ///
nonumbers nomtitles collabels(, none) noobs nolines ///
varlabels(	sex "Female" age "Age" married "Married" doppel "Double earners" ///
			snpanzki "Nr. dependents" swiss "Swiss citizen" zuzugausland "Moved-in from abroad" ///
			pauschaliert "Expenditure-based taxation"  woaufenthalt "Weekend residents" ///
			kirche "Protestant")
			

esttab einmov7 einmov8 einmov9  eresi7 eresi8 eresi9 using summ_employment.tex, replace fragment nofloat	///
cells("mean(fmt(a3))" "sd (par)") label nodepvar   ///
nonumbers nomtitles collabels(, none) noobs nolines ///
varlabels( 	employee "Employee" self_emp "Self employed" retiree "Retiree")
			

esttab einmov10 einmov11 einmov12  eresi10 eresi11 eresi12 using summ_incshare.tex, replace fragment nofloat	///
cells("mean(fmt(a3))" "sd (par)") label nodepvar   ///
nonumbers nomtitles collabels(, none) noobs nolines ///
varlabels(  labor_ratio "Emplyoment" self_ratio "Self-employment" cap_ratio "Capital" ///
			transfer_ratio "Transfers" mob_ratio "mobile income (cap. $+$ trans.)")
			

esttab einmov13 einmov14 einmov15  eresi13 eresi14 eresi15 using summ_taxinc.tex, replace fragment nofloat	///
cells("mean(fmt(a3))" "sd (par)") label nodepvar   ///
nonumbers nomtitles collabels(, none) noobs nolines ///
varlabels(	esatzbestkopf "Rate-determining" esteuerbst "Taxable")

			
esttab einmov16 einmov17 einmov18  eresi16 eresi17 eresi18 using summ_taxwea.tex, replace fragment nofloat	///
cells("mean(fmt(a3))" "sd (par)") label nodepvar   ///
nonumbers nomtitles collabels(, none) noobs nolines ///
varlabels(	vsatzbestkopf "Rate-determining" vsteuerbst "Taxable")

			
esttab einmov19 einmov20 einmov21  /*eresi19 eresi20 eresi21*/  using summ_taxsavings.tex, replace fragment nofloat	///
cells("mean(fmt(a3))" "sd (par)") label nodepvar   ///
nonumbers nomtitles collabels(, none) noobs nolines ///
varlabels(	taxsavings "Total" meantaxsavings "Avg. annual savings")

			
esttab einmov22 einmov23 einmov24  /* eresi22 eresi23 eresi24*/  using summ_dist.tex, replace fragment nofloat	///
cells("mean(fmt(a3))" "sd (par)") label nodepvar   ///
nonumbers nomtitles collabels(, none) noobs nolines ///
varlabels(	dist_km "in km" dist_min "in minutes")


esttab einmov4 einmov5 einmov6  eresi4 eresi5 eresi6 using summ_obs.tex, replace fragment nofloat	///
cells("N(fmt(9.0gc))") label nodepvar obs  ///
nonumbers nomtitles collabels(, none) nolines


						* * * * *  E N D  * * * * * * 
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
